# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/26 14:11
# File: construction.py
# IDE: PyCharm

from django_filters import rest_framework
from models.construction  import Construction
from utils.choices import construction_layout,construction_process
import django_filters


class ConstructionFilter(rest_framework.FilterSet):
    layout = django_filters.ChoiceFilter(field_name='layout',choices=construction_layout)
    process=django_filters.ChoiceFilter(field_name='process',choices=construction_process)
    is_done=django_filters.NumberFilter()
    is_public=django_filters.NumberFilter()
    is_typcal=django_filters.NumberFilter()


    class Meta:
        model = Construction
        fields = ['layout', 'process','is_done','is_public','is_typcal']